package com.acme.bankapp.domain.bank;

public class SavingAccount extends AbstractAccount {

	public SavingAccount(double amount) {
		super(amount);
	}
	
	@Override
	public double maximumAmountToWithdraw() {
		return this.balance;
	}
	
	@Override
	public void withdraw(double amount) {
		if (this.balance > amount) {
			this.balance=this.balance-amount;
			System.out.println(" succsessful. Your balance now: "+balance);
		}
		else System.out.println(" not succsessful (Not enough money on the account). Your balance: "+balance);
	}

}
